import { createRouter, createWebHistory } from 'vue-router'
import Cla from '@/views/cla.vue'
import Orderdelit from '@/views/orderdelit.vue'
import Goods from '@/views/goods.vue'
import Detail from '@/views/detail.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/',redirect:'/cla' },
    { path: '/cla', name: 'cla', component: Cla, },
    { path: '/orderdelit', name: 'orderdelit', component: Orderdelit, },
    { path: '/goods/:query', name: 'goods', component: Goods, },
    { path: '/detail/:goods_id', name: 'detail', component: Detail, },
  ],
})

export default router
